import { createBrowserRouter, Navigate } from 'react-router-dom'
import App from '../App'
import MyHouse from '../Pages/My-House/MyHouse'
import MyRentaHousing from '../Pages/My-rental-housing/MyRentalHousing'
import Home_jwh from '../Pages/Home/Home_jwh'
import MapPage from '../Pages/MapPage/MapPage'
import AddMyHouse from '../Pages/AddMyHouse/AddMyHouse'
import Home from '../lyc/Home'
import Service from '../lyc/Service'
import Login from '../lyc/Login'
import Houserent from '../lyc/Houserent'
import Detail from '../lyc/Detail'
import Addface from '../jxy/Addface'
import Facelogin from '../jxy/Facelogin'
import Zhuce from '../jxy/Zhuce'
import List from '../LX/List'
import List1 from '../LX/List1'
import List2 from '../LX/List2'
import Maint from '../Pages/Maint/Maint'
import MaintItem from '../Pages/Maint/MaintItem'
import MaintInformation from '../Pages/Maint/MaintInformation'
/*聊天页面*/
import Chatroom from '../LH/ChatRoom'
import List3 from '../LX/List3'
import List4 from '../LX/List4'
import List5 from '../LX/List5'
import Notice_detail from '../lyc/Notice_detail'
let router = createBrowserRouter([
    {
        path: '/',
        element: <App></App>,
        children: [
            {
                path: '/myHouse',
                element: <MyHouse></MyHouse>
            },
            {
                path: '/myRentaHousing',
                element: <MyRentaHousing></MyRentaHousing>
            },
            {
                path: '/home',
                element: <Home></Home>,
            },
            {
                path: '/addMyHouse',
                element: <AddMyHouse></AddMyHouse>
            },
            {
                path: '/maint',
                element: <Maint></Maint>
            },
            {
                path: '/maintItem',
                element: <MaintItem></MaintItem>
            },
            {
                path: '/maintInformation',
                element: <MaintInformation></MaintInformation>
            },
            {
                path: '/mapPage',
                element: <MapPage></MapPage>
            },
            {
                path: '/',
                element: <Navigate to='/home'></Navigate>
            },
            {
                path: '/Home_jwh',
                element: <Home_jwh></Home_jwh>
            },
            {
                path: '/service',
                element: <Service></Service>
            },
            {
                path: '/login',
                element: <Login></Login>
            },
            {
                path: '/face',
                element: <Addface></Addface>
            },
            {
                path: '/facelogin',
                element: <Facelogin></Facelogin>
            },
            {
                path: '/zhuc',
                element: <Zhuce></Zhuce>
            },
        ]
    },
    // 房屋租赁
    {
        path: '/houserent',
        element: <Houserent />
    },
    {
        path: "/detail/:id",
        element: <Detail />,
    },
    {
        path: '/list',
        element: <List></List>
    },
    {
        path: '/list1',
        element: <List1></List1>
    },
    {
        path: '/list2',
        element: <List2></List2>
    },
    {
        /*聊天页面*/
        path: "/chatroom",
        element: <Chatroom />
    },
    {
        path: '/list3',
        element: <List3></List3>
    },
    {
        path: '/list4',
        element: <List4></List4>
    },
    {
        path: '/list5',
        element: <List5></List5>
    },
    {
        path: '/notice_detail',
        element: <Notice_detail />
    }

])

export default router;